{literal}
<script type="text/javascript">
	$(document).ready(function(){
		$("#data").mask("99/99/9999");
		$("#telefone").mask("(99)9999-9999");
		$("#form_preatendimento").validate({
            rules: {
            nome: { required: true },
            telefone: { required: true },
            email: { required: true, email: true },
            descricao: { required: true }
	        },
	        messages: {
	            nome: "Obrigatorio",
	            telefone: "Obrigatorio",
	            email: { required: "Obrigatorio", email: "Email invalido" },
	            descricao: "Obrigatorio"
	        },
	        submitHandler: function(form) {
				jqAjaxForm(form, "div_mensagem");
			}
		});        $('#data').datepick({showOn: 'both'});        //$('#data').datepick({dateFormat: 'mm/yy', showOn: 'both'});
	});
</script>
{/literal}
    <form id="form_preatendimento" name="form_preatendimento" method="post" action="{$_site.url}{$acao}">
    
    
    <table width="60%" border="0" align="center" cellspacing="0" cellpadding="0" class="mvTituloFundo">
				  <tr>
					<td>
					{if $preatendimento->id > 0}Editar{else}Novo{/if} Pré-atendimento
					<input type="hidden" name="cod" value="{$preatendimento->id}"/>
					</td>
				  </tr>
				</table>
    <table width="60%" border="0" align="center" cellspacing="0" cellpadding="0">                
                <tr>
                  <td class="contForm">
                  
                  <table width="100%" border="0" align="center" cellspacing="3" cellpadding="0">
                      <tr>
                        <td width="30%" valign="top" class="fundoTituloForm">Nome:</td>
                        <td class="bordaFormResp"><input type="text" name="nome" id="nome" class="formulario tamanhoForm" maxlength="50" value="{$preatendimento->vhr_nome}" /></td>
                      </tr>
                      <tr>
                        <td width="30%" valign="top" class="fundoTituloForm">Telefone:</td>
                        <td class="bordaFormResp"><input type="text" name="telefone" id="telefone" class="formulario tamanhoForm" maxlength="50" value="{$preatendimento->vhr_telefone}" /></td>
                      </tr>
                      <tr>
                        <td valign="top" class="fundoTituloForm">Email:</td>
                        <td width="70%" class="bordaFormResp"><input name="email" id="email" type="text" class="formulario tamanhoForm" maxlength="50" value="{$preatendimento->vhr_email}" /></td>
                      </tr>
                      <tr>
                        <td valign="top" class="fundoTituloForm">Data:</td>
                        <td width="70%" class="bordaFormResp"><input name="data" id="data" type="text" class="formulario" maxlength="50" value="{if $preatendimento->dte_data}{$preatendimento->dte_data}{else}{$dte_data}{/if}" /></td>
                      </tr>
                      <tr>
                        <td valign="top" class="fundoTituloForm">Descrição:</td>
                        <td width="70%" class="bordaFormResp"><textarea name="descricao" id="descricao" rows="7" class="formulario tamanhoForm">{$preatendimento->vhr_descricao}</textarea></td>
                      </tr>
                  </table>
                  
                  </td>
                </tr>
        <tr>
                  <td class="paddingTop15 paddingBottom15" align="center"><!-- === Botões ( Salvar e Limpar ) === -->
                      <span class="paddingRight15">
                      	<input type="submit" value="Salvar" class="botao">
                      </span>
                    <span class="paddingRight15">
                    <input name="limpar" type="reset" id="Limpar" value="Limpar" class="botao" />
                    </span>
                    <input type="button" value="Cancelar" onclick="cancelar(); return false;" class="botao">
                      <!-- Final === Botões ( Salvar e Limpar ) === -->                      </td>
                </tr>
              </table>	
    </form>
